#ifndef TYPESEARCH_H
#define TYPESEARCH_H

#include <QtGui>

#include "resultItem.h"
#include "global.h"

class QLabel;
class QComboBox;
class ResultItem;
class Spacer;
class QGridLayout;
class QGroupBox;
class QPushButton;

class TypeSearch : public QDialog
{
    Q_OBJECT

public:
    explicit TypeSearch(QWidget *parent = 0);

private slots:
    void updateResult();
    void pageSeqInc();
    void pageSeqDes();

private:
    int count;
    int numOfItem;
    int isEmpty;  //是否查找到结果
    int pageSeq;  //页的序号
    int maxPages;
    static const int numOfPerPage = 20;  //每页显示的数量

    QLabel *tmpLabel;
    QLabel *areaLabel;
    QLabel *devLabel;
    QComboBox *area;
    QComboBox *dev;
    QVBoxLayout *mainLayout;
    QGridLayout *bottomLayout;
    QGroupBox *groupBox;
    QPushButton *pageUp;
    QPushButton *pageDown;

    ResultItem *item[MAX_NUM_GRA_BTN];
};

#endif // TYPESEARCH_H
